let initData = {
    name: '杨紫龙',
    list: []
}

let ShopReducer = (state = initData, {type, payload}) => {

    switch(type) {
        case 'GET_LIST':
            return {
                ...state,
                list: payload
            }
        case 'CHANGE_NAME':
            return {
                ...state,
                name: payload.name
            }
        default: 
            return {
                ...state
            }
    }

}

export default ShopReducer